package com.zcf.shiro.idcentity.custom.mapper;

import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author zhaochaofeng
 * @date 2020/5/26 15:10
 */
public interface PermitMapper {

    /**
     * 通过用户
     *
     * @param userId
     * @return
     */
    @Select("select distinct functionUrl from T_IDC_ROLE_MAPPING m, T_IDC_ROLE_PERMIT_INST p" +
            ", T_IDC_FUNC_DEF f where m.OWNERID = #{userId} and m.ROLEID = p.ROLEID and " +
            "f.FUNCTIONID = p.FUNCTIONID and m.OWNERTYPE = '2' and f.functionUrl is not null")
    public List<String> getAllPermit(String userId);

}
